import {request} from '@umijs/max';
import * as API from "@/services";


/** 新闻 分页检索请求 */
export async function queryFrontNewss(params: API.FrontNewsPageQueryParams): Promise<API.RespPageResult<API.FrontNews>> {
    return request('/api/v1/front/news', {
        params,
    });
}

/** 新闻 详情请求 */
export async function queryFrontNews(bizId: API.EntityId): Promise<API.RespResult<API.FrontNews>> {
    return request(`/api/v1/front/news/${bizId}`);
}

/** 新闻 获取所有分类和来源 */
export async function queryNewsParameter(): Promise<API.RespListResult<API.News_Query>> {
    return request('/api/v1/front/news/query-parameter', {
    });
}